package nsga;

import java.util.Properties;

import nsga.Nsga2Algorithm.Nsga2Parameters;

public class NsgaHelpers {
    
    public static Nsga2Parameters getElEmasParameters(Properties properties) {
        
        Nsga2Parameters params = new Nsga2Parameters();
        params.populationSize = Integer.parseInt(properties.getProperty("populationSize")) ;
        params.generationNumber = Integer.parseInt(properties.getProperty("generationNumber"));
        params.childrenMutationProbability = Double.parseDouble(properties.getProperty("parentsMutationProbability"));
        params.parentsMutationProbability = Double.parseDouble(properties.getProperty("childrenMutationProbability"));
        params.ref_f0 = Double.parseDouble(properties.getProperty("ref_f0"));
        params.ref_f1 = Double.parseDouble(properties.getProperty("ref_f1"));
        params.timeLimit = Integer.parseInt(properties.getProperty("timeLimit"));
        params.inputFile = properties.getProperty("inputFile");
        params.hvCalcInterval = Integer.parseInt(properties.getProperty("hvCalcInterval"));
        return params;
    }
}
